/* Janus Chat - Version 1.0
 * Authors: Matthew Perry
 *          Michael Freid
 *          Marc Latou
 *          Richard Lee
 *
 * The Janus Chat Client is a highly secured
 * peer-to-peer chat client designed to facilitate
 * the transfer of sensitive data or as a communication
 * medium for the extra paranoid
 *
 * This file contains the header for the AcceptDialog
 * QT class which describes the window that appears on
 * new connections */

#ifndef ACCEPTDIALOG_H
#define ACCEPTDIALOG_H

#include <QDialog>
#include <QTcpSocket>

namespace Ui {
    class AcceptDialog;
}

class AcceptDialog : public QDialog
{
    Q_OBJECT

    public:
        explicit AcceptDialog( QTcpSocket* sock, QWidget *parent = 0);
        ~AcceptDialog();

    private:
        Ui::AcceptDialog *ui;   /* Generated by QT to store all of the UI elements */

        QTcpSocket* mySock;     /* This is the socket that this dialog will decide
                                 * what to do with */

    private slots:
        void on_buttonAccept_clicked(); /* This slot is activated when the accept button is clicked */
        void on_buttonIgnore_clicked(); /* This slot is activated when the ignore button is clicked */

    signals:
        void accepted( QTcpSocket* sock ); /* This signal is emitted when the socket is accepted */
};

#endif // ACCEPTDIALOG_H
